//
//  ViewController.m
//  中介者模式
//
//  Created by flannery on 2018/12/19.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "ViewController.h"
#import "User.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    User *robert = [[User alloc]initWithName:@"Robert"];
    User *john   = [[User alloc] initWithName:@"Hello! Robert!"];
    
    [robert sendMessage:@"Hi! John!"];
    [john sendMessage:@"Hello! Robert!"];
}


@end
